<!DOCTYPE html>
<html lang="en"xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>員工管理</title>
</head>
<body>
<h1>員工管理</h1>
<a th:href="@{/oper/addEmp}"><button>增加員工</button></a>
<div>
    <table>
        <thead>
        <tr>
            <th>e_id</th>
            <th>e_name</th>
            <th>e_email</th>
            <th>e_gender</th>
            <th>e_birth</th>
            <th>e_d_id</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="emp:${emps}">
            <td th:text="${emp.getEId()}"></td>
            <td th:text="${emp.getEName()}"></td>
            <td th:text="${emp.getEEmail()}"></td>
            <td th:text="${emp.getEGender()}"></td>
            <td th:text="${#dates.format(emp.getEBirth(),'yyyy-MM-dd')}"></td>
            <td th:text="${emp.getEDId()}"></td>
            <td>
                <a th:href="@{/oper/edit/}+${emp.getEId()}"><button>编辑</button></a>
                <a th:href="@{/oper/del/}+${emp.getEId()}"><button>刪除</button></a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>